<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>

<h1 class="page-header">在线测评</h1>

测评目标
<select class="form-control">
    <#list target as i>
        <option value="${i.id}">${i.name}</option>
    </#list>
</select>

<ul class="nav nav-tabs">
<#if me.type='student'>
    <li role="presentation" <#if module?? && module=='1'>class="active"</#if>><a href="?module=1">课堂氛围</a></li>
    <li role="presentation" <#if module?? && module=='2'>class="active"</#if>><a href="?module=2">授课内容</a></li>
    <li role="presentation" <#if module?? && module=='3'>class="active"</#if>><a href="?module=3">教师风格</a></li>
    <li role="presentation" <#if module?? && module=='4'>class="active"</#if>><a href="?module=4">学生自评</a></li>
</#if>
<#if me.type='teacher'>
    <li role="presentation" <#if module?? && module=='1'>class="active"</#if>><a href="?module=1">课堂表现</a></li>
    <li role="presentation" <#if module?? && module=='2'>class="active"</#if>><a href="?module=2">笔试情况</a></li>
    <li role="presentation" <#if module?? && module=='3'>class="active"</#if>><a href="?module=3">学生特点</a></li>
    <li role="presentation" <#if module?? && module=='4'>class="active"</#if>><a href="?module=4">教师自评</a></li>
</#if>
</ul>

<#if module?? && module!='4'>
<form action="/answer" method="post" form-ajax forward="/test">
<table class="table table-striped table-bordered">
<#list list as i>
    <tr>
        <th colspan="3">${i_index+1}、${i.content}</th>
    </tr>
    <tr>
        <td>
            <input type="radio" name="q_${i.id}" value="1" <#if i.answer?? && i.answer=='1'>checked</#if> />
        ${i.q1}
        </td>
        <td>
            <input type="radio" name="q_${i.id}" value="2"<#if i.answer?? && i.answer=='2'>checked</#if>/>
        ${i.q2}
        </td>
        <td>
            <input type="radio" name="q_${i.id}" value="3"<#if i.answer?? && i.answer=='3'>checked</#if>/>
        ${i.q3}
        </td>
    </tr>
</#list>
</table>
    <button type="submit" class="btn btn-default">提交</button>
</form>

<#else>

<form action="/self_feedback" method="post" form-ajax forward=" ">
    <div class="form-group">
        <label for="exampleInputPassword1">内容</label>
        <textarea rows="" cols="" class="form-control" name="content">${self_feedback!}</textarea>
    </div>
    <input type="hidden" name="from_user"/>
    <input type="hidden" name="to_user"/>

    <button type="submit" class="btn btn-default">提交</button>
</form>
</#if>

<div class="modal fade" tabindex="-1" role="dialog" id="model" >
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title"></h4>
            </div>
            <form action="" method="post" form-ajax forward="/standard">

                <div class="modal-footer">
                    <button type="submit" class="btn btn-default">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/laypage/laypage.js"></script>
<script type="text/javascript" src="/static/js/form-ajax.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.validate.min.js"></script>
<script type="text/javascript">
    function toggleSelectAll(self,$sel){
        if(self.checked)
            $sel.each(function(){
                if(!this.checked) $(this).click();
            });
        else{
            $sel.each(function(){
                if(this.checked) $(this).click();
            });
        }
    }
    function del(id){
        if(confirm('确认删除此记录？'))
            $.post('/user/del',{
                id:id
            },function(data){
                if(data){
                    alert('操作成功');location.reload();
                }
                else{
                    alert('操作失败')
                }
            },'json');
    }
</script>
</body>
</html>